import 'package:finance_app/src/entities/message_count_entity.dart';

messageCountEntityFromJson(MessageCountEntity data, Map<String, dynamic> json) {
	if (json['message'] != null) {
		data.message = json['message'] is String
				? int.tryParse(json['message'])
				: json['message'].toInt();
	}
	if (json['notification'] != null) {
		data.notification = json['notification'] is String
				? int.tryParse(json['notification'])
				: json['notification'].toInt();
	}
	return data;
}

Map<String, dynamic> messageCountEntityToJson(MessageCountEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['message'] = entity.message;
	data['notification'] = entity.notification;
	return data;
}